<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:fc="http://fctracker.com/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:pe="http://primefaces.org/ui/extensions">
<h:body>
	<ui:composition id="foodData">
		<div>
			<h2>#{showName ? food.name : ""}</h2>
			<div id="left">
				Glikémiás index: #{food.glicemicIndex != null ? food.glicemicIndex :
				"N/A"}<br /> #{food.quantity} #{food.unitOfMeasurement.name}
				tartalma:
				<ul>
					<li>#{food.calorie} kalória</li>
					<li>#{food.protein} gramm fehérje</li>
					<li>#{food.carbohydrate} gramm szénhidrát</li>
					<li>#{food.fat} gramm zsír</li>
					<li>#{food.fiber} gramm rost</li>
				</ul>
			</div>
			<div id="right">
				<p:pieChart value="#{foodTableController.getPieModelForFood(food)}"
					legendPosition="w" title="Összetevők eloszlása"
					showDataLabels="true" style="width:400px;height:300px" />
			</div>
		</div>
	</ui:composition>
</h:body>
</html>